<template>
	<view class="service_wrap">
		<view class="info_item">
			<view class="title">基本信息</view>
			<view class="input_wrap">
				<view class="left_text">公司名称</view>
				<view class="">{{ detail.name }}</view>
			</view>
			<view class="input_wrap">
				<view class="left_text">公司地址</view>
				<view  class="row_1" style="width: 72%;">{{detail.address}}</view>
			</view>
			<view class="input_wrap">
				<view class="left_text">行业</view>
				<view class="row_1" style="width: 72%;">{{ detail.industries }}</view>
			</view>
		</view>
		<view class="info_item">
			<view class="title">公司介绍</view>
			<view class="">{{ detail.introduce }}</view>
		</view>
		<view class="info_item">
			<view class="title">图片上传</view>
			<view class="add_item">
				<image class="up_img" @click="toOpen()" :src="ossUrl + detail.images" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	import { ossUrl } from '../../../utils/config';
	import {
		companyDetail
	} from '@/api/home.js'
	export default {
		data() {
			return {
				ossUrl: ossUrl,
				detail: ''
			};
		},
		onLoad(options) {
			this.companyDetailFun(options.id)
		},
		onShareAppMessage(res) { //发送给朋友
			return {
				title: '小程序分享',
				imageUrl: '',
			}
		},
		methods: {
			companyDetailFun(id) {
				companyDetail({
					id
				}).then(res => {
					if (res.code == 1) {
						this.detail = res.data
					}
				})
			},
			toOpen() {
				let url = [this.ossUrl + this.detail.images]
				uni.previewImage({
					urls: url
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
.service_wrap {
	min-height: 100vh;
	background: #F5F5F5;
	padding-top: 20rpx;
	padding-bottom: 100rpx;
	.info_item {
		width: 690rpx;
		height: 420rpx;
		background: #fff;
		border-radius: 24rpx;
		margin: 30rpx auto 0;
		padding: 26rpx;
		
		.title {
			font-size: 32rpx;
			font-weight: bold;
			margin-bottom: 30rpx;
		}
		.input_wrap {
			display: flex;
			padding: 30rpx 0 30rpx 0;
			border-top: 1rpx solid #00000010;
			.left_text {
				width: 200rpx;
				font-size: 28rpx;
			}
			.right_icon {
				width: 15rpx;
				height: 24rpx;
			}
			.picker {
				display: flex;
				align-items: center;
				justify-content: space-between;
			}
		}
	
		.add_item {
			width: 180rpx;
			height: 160rpx;
			border-radius: 12rpx;
			.up_img {
				width: 100%;
				height: 100%;
				border-radius: 12rpx;
			}
		}
	}
}
</style>
